/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2015.07.10                                          *
 * Description:      Region groups that consists of several region       *
 *                                                                       *
 *************************************************************************/

namespace FreeMAPs
{

inline bool
Region::use_structured_mesh() const
{
    return d_use_structured_mesh;
}


inline const std::string&
Region::get_region_name() const
{
    return this->get_object_name();
}


inline bool
Region::has_simple_region(
    const std::string& simple_region_name) const
{
    return (d_simple_regions.count (simple_region_name) > 0);
}


inline const SimpleRegion*
Region::get_simple_region(
    const std::string& simple_region_name) const
{
    std::map<std::string, SimpleRegion*>::const_iterator find_region = d_simple_regions.find (simple_region_name);
    FREEMAPS_ASSERT (find_region != d_simple_regions.end());
    return find_region->second;
}


inline const std::map<std::string, SimpleRegion*>&
Region::get_simple_regions() const
{
    return d_simple_regions;
}


inline const std::set<std::string>&
Region::get_simple_region_names()
{
    return d_simple_region_names;
}

}
